chore: migrate remaining gulp build tasks to nx#33510
Open
chaosmirage wants to merge 57 commits into
Open
Conversation
33f6961 to
248a9dc
Compare
…Express/DevExtreme into chore/migrate-devextreme-to-nx-part-9 # Conflicts: # packages/devextreme/build/gulp/npm.js # packages/devextreme/gulpfile.js # packages/devextreme/project.json # packages/nx-infra-plugin/src/executors/bundle/executor.e2e.spec.ts # packages/nx-infra-plugin/src/executors/bundle/executor.ts # packages/nx-infra-plugin/src/executors/bundle/schema.json # packages/nx-infra-plugin/src/executors/bundle/schema.ts # packages/nx-infra-plugin/src/executors/compress/executor.ts # packages/nx-infra-plugin/src/executors/compress/schema.json # packages/nx-infra-plugin/src/executors/compress/schema.ts # packages/nx-infra-plugin/src/executors/concatenate-files/executor.ts # packages/nx-infra-plugin/src/executors/copy-files/executor.ts # packages/nx-infra-plugin/src/utils/file-operations.ts # pnpm-lock.yaml
Contributor
There was a problem hiding this comment.
Pull request overview
This PR continues the DevExtreme build-pipeline migration by moving remaining Gulp-based build tasks into devextreme-nx-infra-plugin Nx executors (with the repo’s “thin executor.ts + <name>.impl.ts” pattern), and wiring DevExtreme’s gulpfile.js to invoke Nx targets for npm packaging, license notice checks, and state-manager optimization.
Changes:
- Introduces new Nx executors (e.g.,
dts-modules,dts-bundle,scss-assemble,license-check,state-manager-optimize,npm-assemble) and shared utilities (createExecutor, glob discovery, license banner rendering). - Refactors multiple existing executors to the
executor.tsre-export +*.impl.tsimplementation pattern, and expands executor schemas (incl. license-header options). - Updates
packages/devextreme/gulpfile.jsto call Nx targets and removes legacy Gulp state-manager and license-check tasks; adds npm template files previously produced by Gulp.
Reviewed changes
Copilot reviewed 132 out of 142 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/nx-infra-plugin/src/utils/types.ts | Adds PackageJson type for license/banner utilities. |
| packages/nx-infra-plugin/src/utils/path-resolver.ts | Adds toPosixPath and resolveOptionPaths helpers. |
| packages/nx-infra-plugin/src/utils/license-banner.ts | Adds reusable license banner templating helpers. |
| packages/nx-infra-plugin/src/utils/license-banner.e2e.spec.ts | E2E tests for license banner rendering/extraction. |
| packages/nx-infra-plugin/src/utils/index.ts | Exports additional utils (create-executor, glob-discovery). |
| packages/nx-infra-plugin/src/utils/glob-discovery.ts | Adds glob expansion/discovery helpers. |
| packages/nx-infra-plugin/src/utils/file-operations.ts | Adds loadProjectPackageJson helper. |
| packages/nx-infra-plugin/src/utils/create-executor.ts | Adds createExecutor wrapper for consistent executor runtime/error handling. |
| packages/nx-infra-plugin/src/executors/vectormap/schema.ts | Adds applyLicenseHeaders option typing for vectormap. |
| packages/nx-infra-plugin/src/executors/vectormap/schema.json | Documents/extends vectormap executor schema. |
| packages/nx-infra-plugin/src/executors/vectormap/executor.ts | Switches to re-exporting vectormap.impl. |
| packages/nx-infra-plugin/src/executors/vectormap/executor.e2e.spec.ts | Adds wiring test for license-header forwarding. |
| packages/nx-infra-plugin/src/executors/state-manager-optimize/state-manager-optimize.impl.ts | New executor to rewrite/remove dev-only state_manager modules. |
| packages/nx-infra-plugin/src/executors/state-manager-optimize/schema.ts | Schema typings for state-manager optimization. |
| packages/nx-infra-plugin/src/executors/state-manager-optimize/schema.json | JSON schema for state-manager optimization. |
| packages/nx-infra-plugin/src/executors/state-manager-optimize/executor.ts | Re-export entrypoint for state-manager optimization executor. |
| packages/nx-infra-plugin/src/executors/state-manager-optimize/executor.e2e.spec.ts | E2E coverage for state-manager optimization behavior. |
| packages/nx-infra-plugin/src/executors/scss-assemble/scss-assemble.impl.ts | New SCSS assemble executor with data-uri() inlining + asset copy. |
| packages/nx-infra-plugin/src/executors/scss-assemble/schema.ts | Schema typings for SCSS assemble executor. |
| packages/nx-infra-plugin/src/executors/scss-assemble/schema.json | JSON schema for SCSS assemble executor. |
| packages/nx-infra-plugin/src/executors/scss-assemble/executor.ts | Re-export entrypoint for SCSS assemble executor. |
| packages/nx-infra-plugin/src/executors/scss-assemble/executor.e2e.spec.ts | E2E coverage for SCSS assemble functionality. |
| packages/nx-infra-plugin/src/executors/prepare-submodules/schema.json | Tightens/modernizes schema metadata. |
| packages/nx-infra-plugin/src/executors/prepare-submodules/prepare-submodules.impl.ts | Moves implementation into *.impl.ts with createExecutor. |
| packages/nx-infra-plugin/src/executors/prepare-submodules/executor.ts | Switches to re-exporting prepare-submodules.impl. |
| packages/nx-infra-plugin/src/executors/prepare-submodules/executor.e2e.spec.ts | Updates E2E assertions around relative-path correctness. |
| packages/nx-infra-plugin/src/executors/prepare-package-json/schema.ts | Expands prepare-package-json options typing. |
| packages/nx-infra-plugin/src/executors/prepare-package-json/schema.json | Adds schema metadata and additional options fields. |
| packages/nx-infra-plugin/src/executors/prepare-package-json/prepare-package-json.impl.ts | New implementation supporting transforms (remove fields, rename, version source). |
| packages/nx-infra-plugin/src/executors/prepare-package-json/executor.ts | Switches to re-exporting prepare-package-json.impl. |
| packages/nx-infra-plugin/src/executors/prepare-package-json/executor.e2e.spec.ts | Adds/updates E2E cases for new transformations. |
| packages/nx-infra-plugin/src/executors/pack-npm/schema.json | Updates schema metadata. |
| packages/nx-infra-plugin/src/executors/pack-npm/pack-npm.impl.ts | Moves pnpm pack logic into *.impl.ts via createExecutor. |
| packages/nx-infra-plugin/src/executors/pack-npm/executor.ts | Switches to re-exporting pack-npm.impl. |
| packages/nx-infra-plugin/src/executors/npm-assemble/schema.ts | Adds schema typings for npm assembly pipeline. |
| packages/nx-infra-plugin/src/executors/npm-assemble/schema.json | Adds JSON schema for npm assembly pipeline. |
| packages/nx-infra-plugin/src/executors/npm-assemble/executor.ts | Re-export entrypoint for npm-assemble executor. |
| packages/nx-infra-plugin/src/executors/localization/schema.ts | Adds applyLicenseHeaders option typing. |
| packages/nx-infra-plugin/src/executors/localization/schema.json | Updates schema metadata + adds applyLicenseHeaders option. |
| packages/nx-infra-plugin/src/executors/localization/executor.e2e.spec.ts | Adds E2E wiring test for license-header forwarding. |
| packages/nx-infra-plugin/src/executors/license-check/schema.ts | Adds typings for license notice verification entries. |
| packages/nx-infra-plugin/src/executors/license-check/schema.json | Adds JSON schema for license notice verification. |
| packages/nx-infra-plugin/src/executors/license-check/license-check.impl.ts | Implements license notice verification executor. |
| packages/nx-infra-plugin/src/executors/license-check/executor.ts | Re-export entrypoint for license-check executor. |
| packages/nx-infra-plugin/src/executors/license-check/executor.e2e.spec.ts | E2E coverage for license-check executor behavior. |
| packages/nx-infra-plugin/src/executors/karma-multi-env/schema.json | Updates schema metadata/URL and descriptions. |
| packages/nx-infra-plugin/src/executors/generate-components/schema.json | Updates schema metadata/URL and descriptions. |
| packages/nx-infra-plugin/src/executors/generate-component-names/schema.json | Updates schema metadata/URL and descriptions. |
| packages/nx-infra-plugin/src/executors/generate-component-names/generate-component-names.impl.ts | Moves implementation into *.impl.ts via createExecutor. |
| packages/nx-infra-plugin/src/executors/generate-component-names/executor.ts | Switches to re-exporting generate-component-names.impl. |
| packages/nx-infra-plugin/src/executors/dts-modules/schema.ts | Adds typings for dts-modules executor options. |
| packages/nx-infra-plugin/src/executors/dts-modules/schema.json | Adds JSON schema for dts-modules executor. |
| packages/nx-infra-plugin/src/executors/dts-modules/executor.ts | Re-export entrypoint for dts-modules executor. |
| packages/nx-infra-plugin/src/executors/dts-modules/executor.e2e.spec.ts | E2E coverage for dts-modules pipeline outputs. |
| packages/nx-infra-plugin/src/executors/dts-modules/dts-modules.impl.ts | Implements .d.ts assembly + licensing + debug stripping. |
| packages/nx-infra-plugin/src/executors/dts-bundle/schema.ts | Adds typings for dts-bundle executor options. |
| packages/nx-infra-plugin/src/executors/dts-bundle/schema.json | Adds JSON schema for dts-bundle executor. |
| packages/nx-infra-plugin/src/executors/dts-bundle/executor.ts | Re-export entrypoint for dts-bundle executor. |
| packages/nx-infra-plugin/src/executors/dts-bundle/executor.e2e.spec.ts | E2E coverage for dts-bundle outputs/transforms. |
| packages/nx-infra-plugin/src/executors/dts-bundle/dts-bundle.impl.ts | Implements TS declaration bundle concatenation + transforms + banners. |
| packages/nx-infra-plugin/src/executors/create-dual-mode-manifest/schema.json | Updates schema metadata/URL and required fields formatting. |
| packages/nx-infra-plugin/src/executors/copy-files/schema.ts | Adds excludePatterns per entry + license-header piping option type export. |
| packages/nx-infra-plugin/src/executors/copy-files/schema.json | Updates schema metadata + adds new options docs. |
| packages/nx-infra-plugin/src/executors/copy-files/executor.ts | Switches to re-exporting copy-files.impl + exports helper. |
| packages/nx-infra-plugin/src/executors/copy-files/executor.e2e.spec.ts | Adds E2E coverage for excludePatterns and license piping. |
| packages/nx-infra-plugin/src/executors/copy-files/copy-files.impl.ts | New implementation with glob excludes + optional post license stamping. |
| packages/nx-infra-plugin/src/executors/concatenate-files/schema.json | Updates schema metadata/description. |
| packages/nx-infra-plugin/src/executors/concatenate-files/executor.ts | Switches to re-exporting impl + exports concat helpers. |
| packages/nx-infra-plugin/src/executors/concatenate-files/concatenate-files.impl.ts | New implementation module with reusable concat helpers. |
| packages/nx-infra-plugin/src/executors/compress/schema.ts | Adds optional license-header application option. |
| packages/nx-infra-plugin/src/executors/compress/schema.json | Updates schema metadata + documents license-header option. |
| packages/nx-infra-plugin/src/executors/compress/executor.ts | Switches to re-exporting impl + exports stripDebug. |
| packages/nx-infra-plugin/src/executors/compress/executor.e2e.spec.ts | Expands E2E coverage (strip-debug mode, excludes, glob expansion, etc.). |
| packages/nx-infra-plugin/src/executors/clean/schema.json | Updates schema metadata/description. |
| packages/nx-infra-plugin/src/executors/clean/executor.ts | Switches to re-exporting impl + exports helper functions. |
| packages/nx-infra-plugin/src/executors/clean/clean.impl.ts | New implementation module with reusable deletion helpers. |
| packages/nx-infra-plugin/src/executors/bundle/schema.ts | Adds applyLicenseHeaders option typing. |
| packages/nx-infra-plugin/src/executors/bundle/schema.json | Updates schema metadata + documents applyLicenseHeaders option. |
| packages/nx-infra-plugin/src/executors/bundle/executor.ts | Switches to re-exporting bundle.impl. |
| packages/nx-infra-plugin/src/executors/bundle/executor.e2e.spec.ts | Adds E2E wiring test for license-header forwarding. |
| packages/nx-infra-plugin/src/executors/build-typescript/schema.json | Updates schema metadata/URL and enum formatting. |
| packages/nx-infra-plugin/src/executors/build-angular-library/schema.json | Updates schema metadata/URL and required formatting. |
| packages/nx-infra-plugin/src/executors/build-angular-library/executor.ts | Switches to re-exporting build-angular-library.impl. |
| packages/nx-infra-plugin/src/executors/babel-transform/schema.ts | Adds copyAssets option typing. |
| packages/nx-infra-plugin/src/executors/babel-transform/schema.json | Updates schema metadata + documents copyAssets. |
| packages/nx-infra-plugin/src/executors/babel-transform/executor.ts | Switches to re-exporting babel-transform.impl. |
| packages/nx-infra-plugin/src/executors/babel-transform/executor.e2e.spec.ts | Adds E2E coverage for copyAssets and removeDebug wiring. |
| packages/nx-infra-plugin/src/executors/babel-transform/babel-transform.impl.ts | New implementation with asset copying and shared stripDebug helper. |
| packages/nx-infra-plugin/src/executors/add-license-headers/schema.ts | Adds new shared ApplyLicenseHeadersOption and adds mode/commentType to main schema. |
| packages/nx-infra-plugin/src/executors/add-license-headers/schema.json | Updates schema metadata + adds mode/commentType definitions. |
| packages/nx-infra-plugin/src/executors/add-license-headers/license-header-mit.txt | Adds bundled MIT license header template. |
| packages/nx-infra-plugin/src/executors/add-license-headers/license-header-eula.txt | Adds bundled EULA license header template. |
| packages/nx-infra-plugin/src/executors/add-license-headers/defaults.ts | Adds defaults + template resolver for license stamping. |
| packages/nx-infra-plugin/src/executors/add-license-headers/add-license-headers.impl.ts | New implementation with reusable banner/header application helpers. |
| packages/nx-infra-plugin/scripts/build.ts | Copies .txt assets; updates build script logging + asset copying behavior. |
| packages/nx-infra-plugin/executors.json | Registers new executors in the plugin catalog. |
| packages/nx-infra-plugin/CLAUDE.md | Adds agent tooling pointer doc. |
| packages/nx-infra-plugin/AGENTS.md | Adds contributor guidance and executor conventions for the plugin. |
| packages/devextreme/gulpfile.js | Replaces several gulp tasks with Nx invocations; adds npm configuration logic. |
| packages/devextreme/build/npm-templates/integration/jquery.d.ts | Adds npm template file previously generated via Gulp. |
| packages/devextreme/build/npm-templates/events/transform.d.ts | Adds npm template file previously generated via Gulp. |
| packages/devextreme/build/npm-templates/events/swipe.d.ts | Adds npm template file previously generated via Gulp. |
| packages/devextreme/build/npm-templates/events/pointer.d.ts | Adds npm template file previously generated via Gulp. |
| packages/devextreme/build/npm-templates/events/hover.d.ts | Adds npm template file previously generated via Gulp. |
| packages/devextreme/build/npm-templates/events/hold.d.ts | Adds npm template file previously generated via Gulp. |
| packages/devextreme/build/npm-templates/events/drag.d.ts | Adds npm template file previously generated via Gulp. |
| packages/devextreme/build/npm-templates/events/dblclick.d.ts | Adds npm template file previously generated via Gulp. |
| packages/devextreme/build/npm-templates/events/contextmenu.d.ts | Adds npm template file previously generated via Gulp. |
| packages/devextreme/build/npm-templates/events/click.d.ts | Adds npm template file previously generated via Gulp. |
| packages/devextreme/build/npm-templates/bundles/dx.all.js | Adds Angular “dx.all.js” hack file template. |
| packages/devextreme/build/npm-templates/.npmignore | Adds .npmignore template for assembled package. |
| packages/devextreme/build/gulp/state_manager/replace_state_manager_modules_for_production.js | Removes legacy Gulp state-manager module rewrite task. |
| packages/devextreme/build/gulp/state_manager/remove_development_state_manager_modules.js | Removes legacy Gulp state-manager dev module removal task. |
| packages/devextreme/build/gulp/state_manager/index.js | Removes legacy Gulp state-manager task wiring. |
| packages/devextreme/build/gulp/state_manager/constants.js | Removes legacy Gulp state-manager constants. |
| packages/devextreme/build/gulp/state_manager/tests/build_state_manager.test.js | Removes legacy Gulp state-manager tests. |
| packages/devextreme/build/gulp/header-pipes.js | Fixes license header template path join. |
| packages/devextreme/build/gulp/check_licenses.js | Removes legacy Gulp license notice check task. |
| packages/devextreme-vue/project.json | Switches add-license-headers executor to MIT mode. |
| packages/devextreme-react/project.json | Switches add-license-headers executor to MIT mode. |
| packages/devextreme-angular/project.json | Switches add-license-headers executor to MIT mode. |
Comment on lines
+43
to
+56
| export function resolveOptionPaths<T extends Record<string, unknown>, K extends keyof T>( | ||
| options: T, | ||
| projectRoot: string, | ||
| keys: readonly K[], | ||
| defaults?: Partial<Record<K, string>>, | ||
| ): Record<K, string> { | ||
| const out = {} as Record<K, string>; | ||
| for (const key of keys) { | ||
| const raw = (options[key] as string | undefined) ?? defaults?.[key]; | ||
| if (raw !== undefined) { | ||
| out[key] = path.resolve(projectRoot, raw); | ||
| } | ||
| } | ||
| return out; |
Comment on lines
+22
to
+30
| export function buildLicenseRegex(entry: LicenseEntry): RegExp { | ||
| const pattern = | ||
| `\\* !\\s*.*${entry.name}${LICENSE_FIELD_SEPARATOR}` | ||
| + `${entry.homepageUrl}${LICENSE_FIELD_SEPARATOR}*\\*\\s` | ||
| + `${entry.copyright}${LICENSE_FIELD_SEPARATOR}` | ||
| + `${entry.licenseType}${LICENSE_FIELD_SEPARATOR}` | ||
| + `${entry.licenseUrl}`; | ||
| return new RegExp(pattern); | ||
| } |
Comment on lines
+1
to
+4
| /*! | ||
| * <%= pkg.name %> | ||
| * Version: <%= pkg.version %> | ||
| * Build date: <%= date %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR should be merged to the 26_1 branch after #33434